home *** CD-ROM | disk | FTP | other *** search
/ Delphi Informant Complete 1995 - 2000 / Delphi Informant Complete 1995 to 2000.iso / Delphi Informant Magazine Complete Works SOURCE CODE 1995.rar / 1995 / AUG / DH9508 / fig3_u.pas < prev    next >
Pascal/Delphi Source File  |  1995-07-05  |  759b  |  42 lines

  1. unit Fig3_u;
  2.  
  3. interface
  4.  
  5. uses
  6.   SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  7.   Forms, Dialogs, StdCtrls, IniFiles;
  8.  
  9. type
  10.   TForm1 = class(TForm)
  11.     ListBox1: TListBox;
  12.     Label1: TLabel;
  13.     Label2: TLabel;
  14.     Label3: TLabel;
  15.     Label4: TLabel;
  16.     ListBox2: TListBox;
  17.     procedure FormActivate(Sender: TObject);
  18.   private
  19.     { Private declarations }
  20.   public
  21.     { Public declarations }
  22.   end;
  23.  
  24. var
  25.   Form1: TForm1;
  26.  
  27. implementation
  28.  
  29. {$R *.DFM}
  30.  
  31. procedure TForm1.FormActivate(Sender: TObject);
  32. var
  33.   AppIni: TIniFile;
  34. begin
  35.   AppIni := TIniFile.Create('WIN.INI');
  36.   AppIni.ReadSection('Ports',Listbox1.Items);
  37.   AppIni.ReadSectionValues('Ports',Listbox2.Items);
  38.   AppIni.Free;
  39. end;
  40.  
  41. end.
  42.